<?php

namespace common\logics;

use Yii;
use common\helpers\Url;

/**
 * This is the model class for table "{{%user}}".
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class UserLogic extends \common\models\user\User {

    /**
     * @inheritdoc
     */
    public function fields() {
        return [
            'id',
            'nickname',
            'mobile' => function() {
                if ($this->mobile) {
                    return parent::decryptMobile();
                }
                return '';
            },
            'avatar',
            'gender',
//            'signature',
            'birthday',
            'register_time' => 'created_at',
        ];
    }

}
